e2b74407f793a64becb4a2164bc60dc97c65f6ec,mosgi.console.component/src/main/java/org/apache/felix/mosgi/console/component/RemoteLogger_jtable.java,RemoteLogger_jtable,handleNotification,#Notification#Object#,166

Before Change



  public void handleNotification(Notification notification, Object handback) {
    StringTokenizer st = new StringTokenizer(notification.getMessage(),":");
    Date d=new Date(notification.getTimeStamp());
    //DateFormat dateFormat = new SimpleDateFormat("hh'h'mm dd-MM-yy");
    DateFormat df = DateFormat.getTimeInstance(DateFormat.MEDIUM); // utilise le format de date local
    DateFormat df2 = DateFormat.getDateInstance(DateFormat.SHORT);
    String id=st.nextToken();
    String name=st.nextToken();
    String shortName=name.substring(name.lastIndexOf(".")+1,name.length());
    String state=st.nextToken();
    String lvl=st.nextToken();
    String msg=st.nextToken();
    Object [] event = new Object []{df2.format(d),df.format(d),handback,id,shortName,state,lvl,msg};
				    
    this.insertRow(0,event); 
    this.fireTableRowsInserted(0, 0);

After Change


  public void handleNotification(Notification notification, Object handback) {
    StringTokenizer st = new StringTokenizer(notification.getMessage(),"*");
    
    long ts=notification.getTimeStamp();
    String date="??/??/??";
    String time="??/??/??";
    if (ts!=0){ // means it's not an old log